<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <link rel="stylesheet" href="/css/cart.css">
</head>

<body>
    <header class="g-hd"></header>
    <div id="my-cartPage">
        <div class="g-bd">
            <div class="g-row">
                <div class="my-cart">

                </div>
                <script type="text/html" id="cart-show">
                    <div class="my-cartBody">
                        <!-- 购物车不为空 -->
                        <div>
                            <!--全选-->
                            <div class="tt">
                                <div class="w w1 left">
                                    <div class="w-checkbox">
                                        <input type="checkbox" id="allCheck">
                                        <span>全选</span>
                                    </div>
                                </div>
                                <div class="w w2 left">商品信息</div>
                                <div class="w w3 ">单价</div>
                                <div class="w w4 ">数量</div>
                                <div class="w w5 ">小计</div>
                                <div class="w w6 ">活动</div>
                            </div>
                            <div>
                            {{each cart shop}}
                                <div class="cart-group">
                                    <div class="cart-item f-cb" data-id={{shop.id}}>
                                        <div class="item w7">
                                            <div class="w-checkbox">
                                                <input type="checkbox" class="check" >
                                            </div>
                                        </div>
                                        <div class="item w8">
                                            <div class="pic">
                                                <a href="javascript:;">
                                                    <img src="{{shop.photo[0].url}}" alt="">
                                                </a>
                                            </div>
                                            <div class="desc">
                                                <a href="javascript:;">{{shop.title.slice(0,10)}}</a>
                                            </div>
                                        </div>
                                        <div class="item item-1 w3">
                                            <p class="price pastprice">
                                                <span>￥</span>
                                                <span>29.00</span>
                                            </p>
                                            <p class="price nowprice">
                                                <span>￥</span>
                                                <span class="pricenow">{{shop.price}}</span>
                                            </p>
                                            <p class="price tag">
                                                <span>限时特价</span>
                                            </p>
                                        </div>
                                        <div class="item item-2 w4">
                                            <div class="u-selnum">
                                                <span class="j-reduce less z-dis">
                                                                            <i class="hx"></i>
                                                                        </span>
                                                <input class="j-input" value="{{shop.num}}">
                                                <span class="j-add more">
                                                                            <i class="hx"></i>
                                                                            <i class="sx"></i>
                                                                        </span>
                                            </div>
                                        </div>
                                        <div class="item item-3 w5">
                                            <p class="price sprice">
                                                <span>￥</span>
                                                <span>{{(shop.price*shop.num).toFixed(2)}}</span>
                                            </p>
                                        </div>
                                        <div class="item item-4 w6">
                                            <a class="del" href="javascript:;">
                                                <i></i>
                                            </a>
                                        </div>
                                    </div>
                                  
                                </div>
                                {{/each}}
                            </div>
                        </div>
                        <!-- 购物车为空 -->
                        <div>
                            <div class="cart-empty">
                                <div class="wrap">
                                    <i class="icon-cart-empty"></i>
                                    <p class="text">购物车还是空滴</p>
                                    <a href="/">继续购物>></a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 总计 -->
                    <div class="cart-total">
                        <div class="checkbox">
                            <input type="checkbox" class="check" >
                            <span class="chose">已选(</span>
                            <span id="allChoose"></span>
                            <span>)</span>
                            <a class="mgl30" href="javascript:;">批量删除</a>
                        </div>
                        <div class="f-fr">
                          <a href="/html/order.html"> <button class="w-button  w-button-primary">下单</button></a>
                        </div>
                        <div class="f-fr mgr25 ">
                            <div class="line">
                                <span class="f-fr mgr">
                                                    <span class="f-fl">应付总额</span>
                                <span class="price f-fl">
                                                    <span>￥</span>
                                <span id="allMoney"></span>
                                </span>
                                </span>
                            </div>
                            <div class="line line-1">
                                <span class="item">商品合计</span>
                                <span class="con mgr25">
                                                    <span>￥</span>
                                <span id="allPrice"></span>
                                </span>
                            </div>
                        </div>
                    </div>
                </script>



            </div>
        </div>
    </div>
    <footer class="g-ft"></footer>
    <script src="/libs/requirejs/require.min.js" data-main="/js/cart"></script>
</body>

</html>